<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../base.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	$(function() {
		$("#btnSave").click(function() {
			if ($("#oldPwd").val() == "") {
				art.dialog.alert('旧密码不能为空，请检查！');
				return false;
			}
			if ($("#newPwd").val() == "") {
				art.dialog.alert('新密码不能为空，请检查！');
				return false;
			}
			if ($("#confirmPwd").val() == "") {
				art.dialog.alert('确认密码不能为空，请检查！');
				return false;
			}
			
			if ($("#confirmPwd").val() != $("#newPwd").val()) {
				art.dialog.alert('两次新密码不一致，请检查！');
				return false;
			}
		});
	});
</script>
</head>
<body>
	<form action="pages/personal/editPwd_handler.jsp" method="post">
		<div style="width: 400px; margin: 0 auto; text-align: center;">

			<div style="margin-top: 80px;">
				旧&nbsp;密&nbsp;码:&nbsp;&nbsp;<input type="password" name="oldPwd"
					id="oldPwd">
			</div>
			<div style="margin-top: 40px;">
				新&nbsp;密&nbsp;码:&nbsp;&nbsp;<input type="password" name="newPwd"
					id="newPwd">
			</div>
			<div style="margin-top: 40px;">
				确认密码:&nbsp;&nbsp;<input type="password" name="confirmPwd"
					id="confirmPwd">
			</div>
			<div style="margin-top: 40px;">
				<input type="submit" id="btnSave" value="保存">&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="reset" id="btnCancel" value="取消">
			</div>
			<div style="margin-top: 40px; color: red;">
				<%=request.getAttribute("msg") == null ? "" : request.getAttribute("msg").toString() %>
			</div>
		</div>
	</form>
</body>
</html>